package cn.lzj.log.controller;

import cn.lzj.basic.util.PageList;
import cn.lzj.log.domain.Log;
import cn.lzj.log.query.LogQuery;
import cn.lzj.log.service.ILogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* 后端接口类；
*/
@RestController
@RequestMapping("/log")
public class LogController {

    @Autowired
    public ILogService logService;
   /**
    * 接口：分页查询或高级查询
    * @param query 查询对象
    * @return PageList 分页对象
    */
    @PostMapping
    public PageList<Log> queryPage(@RequestBody LogQuery query) {
        return logService.queryPage(query);
    }
}
